home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / prolog.arc / HEMAT.FIL < prev    next >
Encoding:
Text File  |  1985-07-11  |  4.0 KB  |  125 lines

  1. /*=============================================================================*/
  2. /*
  3. .PN1
  4. .PO0 */
  5.  
  6. signs :- nl,
  7.   print( 'Does the patient exhibit any of the following signs:' ), nl,
  8.   print( 'weakness, lightheadedness, syncope, cardiac awareness,
  9.   pallor, tachycardia, jaundice.' ),
  10.   affirm,
  11.   syndrome( 1 ).
  12.  
  13. syndrome( 1 ) :- 'undist anemia'.
  14.  
  15. 'undist anemia' :-
  16.    anemia( RBC ),
  17.    print( 'Patient has anemia. We now try to diagnose the specific type.' ),
  18.   'anemia subtype'( RBC ).
  19.  
  20. 'anemia subtype'( RBC ) :-  'congenital hemolytic anemia'( RBC ).
  21. 'anemia subtype'( RBC ) :-  'acquired hemolytic anemia'.
  22.  
  23. 'acquired hemolytic anemia' :-
  24.    ldh( high ),  nl,
  25.    print('Based upon a diagnosis of anemia and ' ),
  26.    print(' high LDH we obtain acquired hemolytic anemia.' ).
  27.  
  28. 'congenital hemolytic anemia'( low )  :-
  29.    'congenital hemolytic history',
  30.    'congenital hemolytic determinant', nl,
  31.    print('Based upon a diagnosis of anemia and '),
  32.    print( 'the just named symptom we diagnose congenital hemolytic anemia.' ).
  33.  
  34. 'deficiency anemia' :- nl,
  35.   print( 'Diagnosis is a deficiency anemia.' ).
  36.  
  37.  
  38. 'congenital hemolytic history' :- jaundice.
  39. 'congenital hemolytic history' :- gallstones.
  40. 'congenital hemolytic history' :- sphenomegally.
  41. 'congenital hemolytic history' :- hepatomegally.
  42. 'congenital hemolytic history' :- 'bony malformations'.
  43. 'congenital hemolytic history' :- 'mental retardation'.
  44.  
  45. 'congenital hemolytic determinant' :- microcytosis.
  46. 'congenital hemolytic determinant' :- eliptocytosis.
  47. 'congenital hemolytic determinant' :- spherocytosis.
  48. 'congenital hemolytic determinant' :- anisopoikilocytosis.
  49. 'congenital hemolytic determinant' :- 'anemia related to food'.
  50.  
  51. microcytosis :- labfindings( microcytosis ).
  52. eliptocytosis :- labfindings( eliptocytosis ).
  53. anisopoikilocytosis :- labfindings( anisopoikilocytosis ).
  54. 'anemia related to food' :- evidence( 'anemia related to food' ).
  55. spherocytosis :- nl,
  56.      print( 'Is the % of spherocytosis > 50%' ), affirm.
  57.  
  58. anemia( RBC ) :- symptom( anemic ), rbc( RBC ).
  59.  
  60. symptom( anemic ) :- hemoglobin( low ).
  61. symptom( anemic ) :- hematocrit( low ).
  62.  
  63. evidence( X ) :- nl,
  64.   print('Has the patient evidence of '),
  65.   print( X ), affirm.
  66.  
  67. labfindings( X ) :- nl,
  68.   print('Are there laboratory findings of ' ),
  69.   print( X ), affirm.
  70.  
  71. jaundice :- evidence( jaundice ).
  72. gallstones :- evidence( gallstones ).
  73. sphenomegally :- evidence( sphenomegally ).
  74. hepatomegally :- evidence( hepatomegally ).
  75. 'bony malformations' :- evidence( 'bony malformations' ).
  76. 'mental retardation' :- evidence(  'mental retardation' ).
  77. 'retarded growth and development' :-
  78.      evidence( 'retarded growth and development' ).
  79. 'crisis of viscera, bones' :-
  80.      evidence( 'crisis of viscera, bones' ).
  81.  
  82.  
  83. /* Laboratory measurements: */
  84.  
  85. rbc( HLN ) :- rbcmeas( RBC ), rbccat( RBC, HLN ).
  86. rbccat( RBC, low ) :- RBC < 4.
  87. rbccat( RBC, high) :- RBC > 6.
  88. rbccat( RBC, norm ) :- RBC = 5.
  89. rbcmeas(RBC) :- nl,
  90.      print( 'Input the RBC in millions/microliter:' ),
  91.      read( RBC ).
  92.  
  93. hematocrit( HLN ) :- hematocrtmeas( HEMAT ), hematcat( HEMAT, HLN ).
  94. hematcat( HEMAT, low ) :- HEMAT < 36.
  95. hematocrtmeas( HEMAT ) :- nl,
  96.      print( 'What is the hematocrit level % per deciliter?:' ),
  97.      read( HEMAT ).
  98.  
  99. mcv( low  ) :- mcv1( low ).
  100. mcv( high ) :- mcv1( high ), not( arct( high ) ).
  101.  
  102.  
  103. mcv1( HLN ) :- mcvmeas( MCV ), mcvcat( MCV, HLN ).
  104. mcvcat( MCV, high) :- MCV > 96.
  105. mcvcat( MCV, low ) :- MCV < 85.
  106. mcvmeas( MCV ) :- nl,
  107.   print( 'What is the level of MCV in cubic microns:' ),
  108.   read( MCV ).
  109.  
  110. ldh( LDH ) :- nl,
  111.   print( 'What is the level of LDH (high,low, or norm)?: ' ),
  112.   read( LDH ).
  113.  
  114. arct( HLN ) :- arctmeas( ARCT ), arctcat( ARCT, HLN ).
  115. arctmeas( ARCT ) :- nl,
  116.   print( 'What is the absolute reticulocyte count in units of thousands:'),
  117.   nl,
  118.   read( ARCT ).
  119.  
  120. affirm :- nl, print( '(y./n.) ?:- ' ),  read( ANS ), nl, yes( ANS ).
  121.  
  122. yes( y ).
  123.  
  124. /*=============================================================================*/
  125.